﻿using ScienceAIApp.ViewModels.AlertViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace ScienceAIApp;
/// <summary>
/// Interaction logic for AlertWin.xaml
/// </summary>
public partial class AlertWin : Window
{
    public AlertWin()
    {
        InitializeComponent();

        this.Height = Screen.PrimaryScreen.Bounds.Height;
        this.Width = Screen.PrimaryScreen.Bounds.Width;
    }

    public void SetAlertViewModel(AlertBaseViewModel vm)
    {
        this.AlertModelViewHost.ViewModel = vm;
        this.AlertWindow.Top = 0;
        this.AlertWindow.Left = 0;
    }

    public new async Task Hide()
    {
        SetAlertViewModel(null);
        await Task.Delay(500);
        base.Hide();
    }

}
